package com.dbky.alg.core.validate.code.processor;

import org.springframework.web.context.request.ServletWebRequest;

/**
 * @Auther: tianchao
 * @Date: 2020/6/25 19:07
 * @Description: 校验码生成器
 */
public interface ValidateCodeProcessor {

    String SESSION_KEY_PREFIX = "SESSION_KEY_FOR_CODE_";
    /**
     * 创建验证码
     * @param request
     * @throws Exception
     */
    void create(ServletWebRequest request) throws Exception;

    /**
     * 校验验证码
     *
     * @param servletWebRequest
     * @throws Exception
     */
    void validate(ServletWebRequest servletWebRequest);
}
